//
//  Father.m
//  NotificationDemo
//
//  Created by shk on 14/12/10.
//  Copyright (c) 2014年 com.shk. All rights reserved.
//

#import "Father.h"
#import "Child.h"

@implementation Father

-(id) initListionChild{
    self = [super init];
    if(self != nil){
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(weakNotification:) name:CHILD_WEAK_NOTIFICATION object:nil];//注册监听小孩醒来的通知
    }
    return self;
}

-(void)weakNotification:(NSNotification*) notification{
    NSNumber *num = notification.object;
    NSLog(@"爸爸收到小孩醒来的通知了，小孩睡了%@分钟。", num);
}




@end
